﻿' Copyright (C) 2015 HTTPBuilder
'
' This program is free software: you can redistribute it and/or modify it under the +terms 
' of the GNU General Public License as published by the Free Software Foundation, either 
' version 3 of the License, or (at your option) any later version.

' This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
' without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
' See the GNU General Public License for more details.

' You should have received a copy of the GNU General Public License along with this program.
' If not, see http://www.gnu.org/licenses/. 

''' <summary>
''' Providers list of known headers.
''' </summary>
''' <remarks></remarks>
Public NotInheritable Class KnownHeaders

#Region "Constants"
    ''' <summary>
    ''' Known headers splitted by a comma.
    ''' </summary>
    ''' <remarks></remarks>
    Private Const KNOWN As String = "Accept-Charset,Accept-Language,Accept-Encoding,Authorization,Cache-Control,Content-Length,Content-Type,Connection,Cookie,Keep-Alive,Pragma,User-Agent"
#End Region

#Region "Public properties"
    ''' <summary>
    ''' Returns the list of headers.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Shared ReadOnly Property List As String()
        Get
            Return KNOWN.Split(",")
        End Get
    End Property
#End Region

#Region "Public methods"
    ''' <summary>
    ''' Checks for a known header.
    ''' </summary>
    ''' <param name="header"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Shared Function IsKnown(header As String) As Boolean
        Return List.Contains(header.ToLower)
    End Function
#End Region
End Class
